let fs = require('fs')
const Promise = require('./promise')

function read(filename) {
    return new Promise((resolve, reject) => {
        // fs.readFile(filename, 'utf8', (err, data) => {
        //     if(err) {
        //        return reject(err)
        //     }
        //     resolve(data)
        // })
        resolve('1000')
    })
}
// 调用 p1.resolve(100) => p1.then(data =)
//      p2.resolve(1) _ => p2.then(data)
let promise2 = read('./node/name.txt').then(data => {
     return 1
})
promise2.then(data => {

})

